package com.sun.relationship.base;

import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "DEMO_PROJECT")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)  
@DiscriminatorColumn(name = "CLASSNAME", discriminatorType = DiscriminatorType.STRING, length = 30)  
@DiscriminatorValue("base") 
public class BaseProject implements java.io.Serializable {
	private static final long serialVersionUID = 1181250407470555788L;
	private String id;
	private String name;
	private Integer age;
	private Date occDate;

	public BaseProject() {
	}

	public BaseProject(String name, Integer age, Date occDate) {
		super();
		this.name = name;
		this.age = age;
		this.occDate = occDate;
	}
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "bizGenerator")
	@GenericGenerator(name = "bizGenerator", strategy = "uuid")
	@Column(length = 32)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public Date getOccDate() {
		return occDate;
	}

	public void setOccDate(Date occDate) {
		this.occDate = occDate;
	}
}
